# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=perl-ppix-utils
pkgver=0.003
pkgrel=1
pkgdesc="Utility functions for traversing PPI documents"
url="https://metacpan.org/pod/PPIx::Utils"
arch="noarch"
license="GPL-1.0-only OR Artistic-1.0-Perl"
depends="perl-b-keywords perl-ppi"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/D/DB/DBOOK/PPIx-Utils-$pkgver.tar.gz"
builddir="$srcdir/PPIx-Utils-$pkgver"

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="
7f56bc2bf2afbf1f6d3c0e5bc0ed21752be809714e32b256feb1ea39125c7671c6ef949e2c122a95a41d3a603f5d5253133886f3700890387ad6cf0732ab87c6  PPIx-Utils-0.003.tar.gz
"
